package com.example.exerciseextract2.presenter;

import android.util.Log;

import com.example.exerciseextract2.base.BasePresenter;
import com.example.exerciseextract2.bean.RvBean;
import com.example.exerciseextract2.movdel.MainPageModel;
import com.example.exerciseextract2.net.ResultCallBack;
import com.example.exerciseextract2.view.MainView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 阿炜啊 on 2020/7/12.
 */

public class MainPresenter extends BasePresenter<MainView> {


    private MainPageModel mMainModel;

    public void getData() {
        mMainModel.getData(new ResultCallBack<RvBean>() {
            @Override
            public void onSuccess(RvBean list) {

                mView.setDataa(list);
            }

            @Override
            public void onFail(String msg) {
                Log.d("tag", "onFail: "+msg);
            }
        });
    }

    @Override
    public void initModel() {
        mMainModel = new MainPageModel();
        addModel(mMainModel);
    }
}
